﻿@model List<Core.Contract.DataContract.RelaxMenuDataContract>
@if (Model != null)
{
    <ul id="cssMenu">
        @foreach (var item in Model.Where(p => p.Parent ==null))
        {
            var lChild = Model.Where(p => p.Parent == Convert.ToString(item.Id)).ToList();
            if (lChild.Any())
            {
              // .// var control=item.Link
                <li>@Html.ActionLink(item.Name,item.Link,"Home",new{cul=Session["Culture"]},new{target=item.Target,title=item.Name}) 
                    @*<a href="~/@item.Link?cul=@Session["Culture"]" target="@item.Target" title="@item.Name">@item.Name</a>*@ 
                    <ul>
                        @foreach (var item1 in lChild)
                        {
                            <li>
                                @Html.ActionLink(item1.Name,item1.Link,"Home",new{cul=Session["Culture"]},new{target=item1.Target,title=item1.Name})
                                @*<a href="~/@item1.Link?cul=@Session["Culture"]" target="@item1.Target" title="@item1.Name">@item1.Name</a>*@
                            </li>
                        }
                    </ul>
                </li>
            }
            else
            {
                <li>
                    @Html.ActionLink(item.Name,item.Link,"Home",new{cul=Session["Culture"]},new{target=item.Target,title=item.Name}) 
                    @*<a href="~/@item.Link?cul=@Session["Culture"]" target="@item.Target" title="@item.Name">@item.Name</a>*@
                </li>
            }
        }
       
        @*@if (Convert.ToBoolean(Session["Success"]))
        {
            <li>
                <img src="../@Session["Username"]" alt="@Session["Alt"]"  title="@Session["Alt"]"/>
                <ul>
                    <li>
                        @using (Html.BeginForm("Logoff", "Account", FormMethod.Post, new { id = "logoutForm" }))
                        {
                            <a href="javascript:document.getElementById('logoutForm').submit()">@Utility.GetResource.GetResouceValue(Session["Culture"], "lblLogout")</a>
                        }
                    </li>
                </ul>
            </li>
        }
        else
        {
            <li><a href="~/Dang-Nhap.html">@Utility.GetResource.GetResouceValue(Session["Culture"], "lblLogin")</a></li>
        }*@
    </ul>

}



